CREATE PROCEDURE [dbo].[SeleccionarPensumDesactivados]
@id_Escuela int
AS
BEGIN
	SET NOCOUNT ON;
	
	SELECT id_Pensum, fechaInicio
	FROM Pensum 
	WHERE fk_id_escuela = @id_Escuela 
	AND statusPensum ='DESACTIVADO'
	AND id_Pensum NOT IN(
	SELECT pp.id_pensum FROM PensumPeriodoAcademico pp)
	
	
END;